home *** CD-ROM | disk | FTP | other *** search
/ 3D World 48 / 3D World CD Interactive Issue 48 (3DWi48) (2003).iso / mac / Tutorials / Using mo-cap data in LightWave / Using mo-cap data in LightWave.txt < prev   
Text File  |  2003-12-16  |  12KB  |  108 lines

  1. Using motion-capture data in LightWave
  2.  
  3. By Olaiya Gardner and Vincent Tang
  4. University of Georgia
  5.  
  6.  
  7. NOTE: This is a text-only version of the tutorial. To view the accompanying screengrabs, please refer to the .doc version (Microsoft Word format) on the CD
  8.  
  9.  
  10. This tutorial explains the process of using motion-capture data to drive a character's animation within LightWave. To do so, weΓll be rigging the models in LightWave, importing them into FiLMBOX, KaydaraΓs real-time character animation package, applying mo-cap data (you can find five sample files on this cover CD), then transferring the completed animation back into LightWave.
  11.  
  12. WeΓll be assuming that you already have some basic knowledge of LightWave 7.5, and know how to set up skelegons in Modeler or Bones in Layout. Since version 4.0, FiLMBOX has been known as MOTIONBUILDER, but youΓll find that the walkthrough also works in the newer versions of the software. (A full copy of MOTIONBUILDER 4.0 PE was included on the CD with issue 41 of 3D World.)
  13.  
  14. For the purposes of the tutorial, weΓll be using low-polygon segmented models, so as to make it easier to explain the basic procedures. The same techniques can also be applied to non-segmented and high-polygon models. The characters we will be using are Odessa, modeled and textured by Joe Gardner, and Cybot, modeled and textured by Vincent Tang.
  15.  
  16.  
  17. A. Preparing your character in LightWave
  18.  
  19. 1. Basic setup
  20. Preparing your model correctly before exporting it to FiLMBOX can save a lot of headaches later in the project. It is important to have you character in the T-Pose and facing down the -Z axis, otherwise you risk unexpected errors later. If you decide to use a high-polygon model, make sure you freeze your character.
  21.  
  22. 2. Bones
  23. When you finished creating a model, just set up skelegons as you normally would. You can either create them in Modeler or Layout - in this case, we chose Modeler. Here, you can see two possible setups that we used and found to work with our characters. No single set up will necessarily work for every character you create. 
  24.  
  25. As you can see, there are extra Skelegons for Cybot. Although both set-ups work in the same way in FiLMBOX, these extra Skelegons give a little more control over the end results. It is important that there is a bone called ROOT. In the 23 and 16 Skelegon setup, it is important that the ROOT bone is the parent of all other existing Skelegons. Be sure to label the Skelegons so that they can be easily identified after export to FiLMBOX. These are the names we used:
  26.  
  27. 3. Weight maps
  28. Even though you can create weight maps in FiLMBOX, it is the weight maps in LightWave that we are most concerned with here. These are slightly different for our two characters.
  29.  
  30. Because Odessa is segmented and has a 16-Skelegon setup, we decided to set the weight maps at 100% influence for each section of the model assigned to a bone, with absolutely no vertices sharing a bone.
  31.  
  32. For Cybot, the weight map setup is similar, except that there is some sharing of weight maps. The sharing occurs at some of the major joints of the character - elbows and knees. CybotΓs segments at the elbows and knees were unnecessary because the knees caused the model to tear so the knee was assigned to the thighΓs weight map.
  33.  
  34. As you create the weight maps, you have to name them. These names need to correspond to the Skelegon names that they will be assigned to. Once they are all created, open the Skelegon Tree and assign the weight maps to the correct Skelegon.
  35.  
  36. Be sure to save as you go along! Note: if you want to have morph targets on your character, you need to set those up as well before taking it over into FiLMBOX.
  37.  
  38. 4. Layout
  39. Send your character to Layout and convert your Skelegons to bones. In the Schematic view, make sure to check your bone hierarchy and make any necessary changes.
  40.  
  41. If you do need to make a change, be sure to keep an eye on the bones and the character to make sure that you donΓt have any unwanted movement. ItΓs also a good idea to go to the Property Inspector and check each bone to make sure that the weight maps are assigned correctly. Double-checking at this stage will save a lot of time and work later. 
  42.  
  43. Now, save two scene files for each character. Yes, two. The first will be the original. If anything goes wrong, refer back to this one. The second will be the one that we use while in FiLMBOX. 
  44.  
  45.  
  46. B. Importing the characters into FiLMBOX
  47.  
  48. This part of the tutorial assumes that you have some knowledge of FiLMBOX and motion-capture data. DonΓt forget: if you donΓt have FiLMBOX, these same procedures can be applied in MOTIONBUILDER. WeΓll be working with five motions we captured at the University of GeorgiaΓs motion-capture studio, in ViconΓs .c3d format (you can find these on the CD). Although the space we had to work with was only 8ft in diameter, we were happy with the information we were able to record. 
  49.  
  50. At this point, you need to set up the character in FiLMBOX that you will map your LightWave character to. With the Actor tab selected, position the actor (the FiLMBOX model) to the motion file of the T-pose you have imported. Selecting the root will translate, scale, and rotate the entire actor when trying to position it to the T-pose. Select other parts of the actor to individually transform them.
  51.  
  52. After fitting the actor to the T-pose, continue with marker setup. Once you finish the marker setup, import the scene/motion file as you did with the T-pose.
  53.  
  54. Creating rigid bodies will help keep your character in one piece. This is especially good if you have segmented characters. It prevents the limbs or other parts of the body from floating around the scene. Snap all when finished.
  55.  
  56. After opening and setting up the second actor and character, you may also want to create rigid bodies for it. When you do, the second T-pose will be overlapping the first T-pose, so be careful not to select markers from the first T-pose (zoom in if you find it difficult to tell which pose the markers belong to).
  57.  
  58. Before you import your character, select the Character button located on the left-side column. Click Create and enter the name of your motion-capture performer.
  59.  
  60. Now letΓs import the LightWave character. Go to File/Scenes/Import/LightWave 6.X LWS. Open the T-Pose of your character. This is the same file that we made a copy of in LightWave, and it is here that we will utilize it. If youΓre working on a two-character scene, open the T-pose for your first character.
  61.  
  62. Next, click in the viewing window and press [Ctrl] + [W] to switch to schematic view. Hold [Shift] + [Left Mouse Button] and move across the screen to find the bone structure of your model.
  63.  
  64. Once you find it, click Define below the viewing window and then begin double clicking the labels of the bones in the window and [Alt]-dragging them into the list under the Define tab. If you have a bone structure with extra shoulder and pelvis bones, do not list them, because they can cause the model to become deformed when it is exported back to LightWave.
  65.  
  66. If you make a mistake during labeling, just double-click on the name under the Model list, delete the name from it and hit [Enter]. After you have labeled all the bones, switch back to the regular viewing mode ([Ctrl] + [W]) and click Characterize.
  67.  
  68. Now click the General tab beside the Define tab. For Type, select Actor Input, and for Source, select the performerΓs name. Click Active and your character should now snap to the performerΓs position. 
  69.  
  70. Now letΓs watch your character in motion. Select Models option under the Viewing Attributes in the view list on the right column. Play the scene. (You can find scene files on the cover CD.)
  71.  
  72. If everything moves okay, then save your file. This will be an .fbx file. 
  73.  
  74. Note: If you get deformation on your character in FiLMBOX, remember that the FiLMBOX weights are not the same as the LightWave weights. A good thing to do would be to wait before you stress and export your character back to LightWave. If things are not quite right in LightWave, you may have to go back and start back at the point where you bring in your model into FiLMBOX, checking you weight maps in LightWave again before you do so.
  75.  
  76. For a two-model scene, save the scene under a different name and then repeat the import process and all the procedures thereafter the second model. 
  77.  
  78. Now letΓs get ready to go back to LightWave. But before exporting the file, there are a couple of things you need to do. Return to the Schematic view and select only the bone labels. They should be green when highlighted.
  79.  
  80. Select the Animation button and click Plot Current and hit OK. Also hit Plot all, just for safetyΓs sake. 
  81.  
  82. Go to File/Scenes/Export/LightWave 6.X LSW and choose the duplicate LightWave scene that you made. Hit OK and it will overwrite that file. 
  83.  
  84. Note: For the two-character scene, you should plot the animation to the characters one at a time. Choose the first characterΓs bone labels, plot the animations and export, saving over the first LightWave file. Then choose the second character and repeat, this time saving over the second LightWave scene.
  85.  
  86.  
  87. 3. Transferring the scene back into LightWave
  88. Back to LightWave. Open the LightWave scene that you just saved over and your character should come in at the start position of the motion that you applied in FiLMBOX. Play the animation and watch your character move. 
  89.  
  90. For the two-character scene, open the first characterΓs scene and play the animation to make sure that everything is fine. Now go to File/Load/Load Items from Scene and choose the second characterΓs file. You should now have a LightWave scene with both characters in it.
  91.  
  92. Save your scene under a new name. You sure donΓt want to save over the wrong file. Also, never delete any of your files that contain the original data. You never know when you might need it. Congratulations! You have now imported motion-capture data into LightWave.
  93.  
  94. But what happens if you need to make any changes? Well, letΓs take a look. If you go to the Graph Editor, you will notice that there are key frames on every frame for every bone. DonΓt be alarmed - we will make this more manageable. LightWave, FiLMBOX, and MOTIONBUILDER all have motion-filtering function. By using a filter, we can get cleaner motion files, reducing the number of key frames and motion tweaks - for this example, we choose to filter in LightWave. You still have the same control on every bone as you would normally have, so donΓt be afraid to make changes.
  95.  
  96. If you click on your characterΓs name, all of its channels will appear. Holding down the right mouse button, select them from the start keyframe to the end keyframe by drawing a marquee around them. They will now all be highlighted. You may have to wait a couple of minutes to do this depending on your system because of the large volume of data.
  97.  
  98. Now go to the Keys dropdown, and choose Set Key Reduction Threshold.  A small popup window will appear, asking you ╬by what percentage would you like to reduce the keys?Γ It is important to note that the more you reduce your keys, the more motion data you are getting rid of; get rid of too much, and your character will begin to float. We recommend that you save your scene under a new name after every key reduction so that you can refer back to a previous file. Just be sure to check your motions every time you do a reduction. We initially started out with a 50% reduction and kept repeating the process until we were happy that our motions were smooth, not floating, and that the number of keys we were left to play with was manageable.
  99.  
  100. To see the end results, check out the AVI file on the CD. We hope that this process has helped with your motion-capture projects. There is a lot of free motion-capture data out there on the Internet, so keep experimenting, and have some fun!
  101.  
  102. For further information, contact:
  103. Olaiya Gardner (olag@handh-3d.net) - www.handh-3d.net
  104. Vincent Tang  (vintang88@hotmail.com)
  105. Thanks to Joe Gardner (LightWave) and Maki Fukumoto (Vicon) for their help, and to our motion capture actors; Kenny Kilfara, David Limbach, and Clif Ruch.
  106.  
  107.  
  108.